using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using TimeTableManagement.Entities;

namespace TimeTableManagement.Mapping
{
	public class Tb_LogMap : EntityTypeConfiguration<Tb_Log>
	{
		public Tb_LogMap()
		{
			// Primary Key
			this.HasKey(t => t.id);

			// Properties
			this.Property(t => t.type)
				.HasMaxLength(50);
				
			this.Property(t => t.user)
				.HasMaxLength(50);
				
			this.Property(t => t.result)
				.HasMaxLength(50);
				
			this.Property(t => t.session)
				.HasMaxLength(255);
				
			this.Property(t => t.option)
				.HasMaxLength(255);
				
			// Table & Column Mappings
			this.ToTable("Tb_Log");
			this.Property(t => t.id).HasColumnName("id");
			this.Property(t => t.date).HasColumnName("date");
			this.Property(t => t.type).HasColumnName("type");
			this.Property(t => t.action).HasColumnName("action");
			this.Property(t => t.user).HasColumnName("user");
			this.Property(t => t.result).HasColumnName("result");
			this.Property(t => t.session).HasColumnName("session");
			this.Property(t => t.option).HasColumnName("option");
		}
	}
}

